#ifndef COLLISIONHANDLER_H_0d902dbc_e933_4c29_8205_1b6bfc261f07
#define COLLISIONHANDLER_H_0d902dbc_e933_4c29_8205_1b6bfc261f07

#include "isceneobjectvisitor.h"

class Scene;

class CollisionHandler : public ISceneObjectVisitor
{
public:
    CollisionHandler(Scene *scene);
    ~CollisionHandler();

    void reset();

    void visit(Mage *mage);
    void visit(Potion *potion);
    void visit(Spell *spell);

    void handle(Potion *first, Potion *second);
    void handle(Mage *first, Mage *second);
    void handle(Spell *first, Spell *second);
    void handle(Mage *mage, Potion *potion);
    void handle(Mage *mage, Spell *spell);
    void handle(Spell *spell, Potion *potion);

private:
    enum State {
        State_INITIAL,
        State_FIRST_VISITED,
        State_SECOND_VISITED
    };

    Scene *_scene;
    Mage *_mage;
    Potion *_potion;
    Spell *_spell;
    State _state;
};

#endif // COLLISIONHANDLER_H_0d902dbc_e933_4c29_8205_1b6bfc261f07
